#pragma once
#include "CXcpObjectBase.h"
#include "IPALImageDecodeCallback.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"

class ImageCache;

class ImageCacheDecodeCallback :
	public CXcpObjectBase<IPALImageDecodeCallback,CXcpObjectThreadSafeAddRefPolicy>
{
public: 
	static HRESULT Create(ImageCache * pCache, ImageCacheDecodeCallback * * ppCallback);
	void Disconnect();
	virtual HRESULT OnDecode(struct IPALImageDecodeResponse * pResponse);

protected: 
	ImageCacheDecodeCallback();
	virtual ~ImageCacheDecodeCallback();
	HRESULT Initialize(ImageCache * pCache);
	ImageCache * m_pCache;
};